$(function(){
//	newFastClick(document.body);
	var locations=location.href;
	var status=locations.split("?")[1];
	setTimeout(function(){
      	
		var mySwiper = new Swiper('.swiper-container',{
				autoHeight:true,
				speed:0,
			   	hashnav:true,
				hashnavWatchState:true,
			    onSlideChangeStart: function(swiper){
			    	$(".navs a").removeClass('active');
			      	$(".navs a").eq(mySwiper.activeIndex).addClass('active');
			      
			      	$(".botbar").removeClass("type1").removeClass("type2");
			      	
			      	var num=mySwiper.activeIndex*1+1;
			      	$(".botbar").addClass("type"+num);
			      	check_amount();
			      	check_amount2();
			      	
//			      	console.log($(".botbar").attr("class"));
			      document.body.scrollTop = document.documentElement.scrollTop = 0;
			     
			     }
			    
			  })
			if(status==1){
				mySwiper.slideTo(1)
			}else{
				mySwiper.slideTo(0)
			}
			$(".navs .Btnbutton").on('touchstart mousedown',function(e){
				e.preventDefault();
				$(".navs .Btnbutton").removeClass('active');
				$(this).addClass('active');
				mySwiper.slideTo($(this).index());
				check_amount();
				check_amount2();
			})   
			
			$(".navs .Btnbutton").click(function(e){
			    e.preventDefault();
			    e.stopPropagation();
			    mySwiper.slideTo($(this).index());
			})
			
	},500)
	
})


